Fixed issue where attribute offsets were incorrect