Fix for undefined error
Added production flag