change end position to correct attr