Hard to say without being there, but it sounds to me like you did the right thing. Many times I'm in a similar situation, in which it could appear to a motorist that I should be further right, but if I waited to the last minute to merge into the lane, I'd lose the chance to merge into a gap.