fixed bug that would cause the apptemplate to fail if no db entry existed