rollback previous optimization + try to fix failures on Travis CI