fix behavior when popping up images