Fix bug in base template