sql fix
todo added