the requested change.

fix sector numbering as requested + checking if sector is changed in
writing sectors.