Fixing issue with image transitions