fixes error thrown in firefox