offset error on flag processing