fixed some warnings and browser compatibility issue with IE