fixed prepared queries