fixed another bug in catalua.cpp