Fixing dynamic zoom bug