Fixed NPE when unregestering service