Fix a bug when inner segments are not reset properly while resolving the data