Baby clicking while eating

Does anyone know why baby would be clicking sometimes while eating? It seems to happen more on one side than the other. I saw a lactation consultant and she said that her latch was good. It hurts at first when baby latches, but the pain quickly goes away, but then when the clicking happens it hurts again. It happens multiple times during a nursing session.