minor fixes for phantomjs on ubuntu