another attempt to fix cross browser compatibility