fix bug, add raise 404 if template not found.