I think the yellow was harsh. Right decision to disallow the goal but if the ref thought it was deliberate then it should have been red. If it's not deliberate (I don't think he knew anything about it) then it shouldn't have been a card.
Not sure if that's the rules but that's what I believe