bugfixes for safari and firefox