fixing bug only occuring in chrome