Fixed SQL display issues