some fixes to work in firefox