bug fixes for firefox and safari