Fixed SQL shit