Fixing missing var and extra comma