Fixing differences between safari and chrome