Fixed a bug where $user on line 201 was not defined.