further corrections for the keepalive hack