timeout and loops  inserted to fix phantomjs crash
Merge branch 'master' of https://github.com/nikhatkarimi/nw