Fix some regression after phantomjs implementation