As you've discovered, the limit switch was not being properly triggered and the stepper motor for the x-axis was continuing to move (not-move) until you powered off.
Consider for future images (photos/videos) to hold the phone in landscape mode for better imaging.