Crossbrowser fixes

Fixes for Firefox, Safari and Chrome

Fixes:
#2747
#2754 
#2740 
#2643
#2757