Fix template relative paths