fixed error in user passing to js