Fix template problem with format being set to None