fix conditions crash