Corrected an offset bug