fix for when compiled to chrome