fixed crashing when picking an image