fixed null pointer on connection.start