Fix for prepared statements in multi-node environments