some modifications and fix ie8