Fixes image opacity transition bug.