unit test fix with phantomjs karma test