Replace tabs with spaces and add missing bracket