Fix @Krinkle's comments and fix PhantomJS