fix handling of reset case