It can be the shampoo and foam leftovers that you didn’t wash out properly. Next time try to rinse your hair more thoroughly.