Fix some bugs in Chrome