Fixed a scoping issue with creating new users