fix for sql typo