Fix template upload