Fix template loading