fixed bug that broke apptemplate js