Error in browser fixed (process is undefined -- need to call typeof process)