bug fix for displaying different sized images in slider