LB-1706: Fixed testing

For some reason the deferred isn't returned form phantomjs.
Merge pull request #210 from nistormihai/master

LB-1706: Fixed testing