Fix for bug where deleting a user caused a constraint violation.