fixed 2 bugs

we need to create a copy of user so that we don't get segfault in case the edit which own this user gets deleted meanwhile