fix deactivate issue, thanks @5im0n