fixed SIGSEGV bug when opening and closing multiple image pickers