fix premature callback() in loadTemplates()
fix url resolution when checking for cached template