Fixing invalid? test in travis-ci