Can you read the drawings in the datasheet? They describe the pins of the transistor.I see it now. When the driving relay falls open, it is grounding the other end of the motor, completing a short across the motor. I can't easily see how to fix that with a reversable setup like this. I'm getting ideas, but it isn't simple. We'd have to go into H-bridge configuration with 4 relays. Can you live with the way it is?