fixed problem with deactivating