Model X Wing Door Collision With Head (Twice)

The wing door of our Model X has whacked me in the head twice. Both times I was exiting the front passenger door when someone else pressed the button to close the door. The second time I was actually standing still as I waited for a woman who was petting my dog to move. The door hit the top of my head very hard - I actually saw stars both times and it took days for my head and neck to recover. Has anyone else had this problem? Shouldn’t there be a sensor? It must be a pretty common scenario for all passengers to exit at the same time and for people to be near the car when the doors close.