Fixed error since I didn't finish the query