fixed bug when deleting user records