fix crash when add_temp with invalid rules