[ai-0.36-21] crash fix (could be more causes)