Fixed a bug where you could select an unusable image despite the popup