Converting offset to int on decode