Fixed tests and Travis build