sql card fix