Added better error message for offset error.