Fix issues
Fix some issues in phantomJS