Pictures on Vertical

I have pixhawk V1 on Rc plane for photogrammetry.
Camera i use Sony a5100.

When flying the mission it randonly takes pictures on the vertical. Camera is facing forward. Anyidea?