fallback on setTimeout, solves issue with phantomJS