fixing undefined functions problems on topology.sql files