Always run cleanup prepared statements before disconnecting