Fixing some Travis bugs

Rishabh,

I m having a look through your code, and I hope I have fixed a couple of bugs.  I will issue a pull request and if more tests pass before working on the other failed tests.

Thanks,

Jack