Workaround for PhantomJS bug (http://goo.gl/8r4C40)