fix crash in android on removing delegate