fixed user is not defined error