fixing broken keepalive feature