fix singleton comparison

and indenting