fixing ie8, and some bugs