bugfix for keep_alive