bug fix for client not disconnecting