Fixed not releasing lock on phantomjs process