Critical bugfix: SQL typo