fix cloning query