fixed refactor error in destory method of memberships controller