fix validation of modification query