fix a bug with the slim template