fix tempaltes with BASE_DIR