fixed referenceerror in controller