Fix bug when history is empty and remove PhantomJS from dependencies