fix exception jasmine complained about