fixed bug so that modal images displayed correctly