Fixed error with offset pixel generation