[2] fix some sql shit