[FIX] Fix for the auto calculate offset while length changed.

Signed-off-by: Ramakrishnan P <ramakrishanan_p@kalycito.com>