Fixed image referencing bug when show active layer was selected