Fixed wrong sql formatting