fixed safari and old IE ducktyping bug