small fixes for safari compatability