Fixed a crash that happened with service connection.