fix statement existance checks in kiwi loader