Fixed off-by-one pixel error