Fixed issues reported by tests at Travis CI