added workaround for phantomjs weirdness