Fix for crash on agro (not tested).