fixing offset issues