Fixing 500 error for missing templates