Merge the patches of @maoziliang.

Includes IE fixes.