minor clean up

fix spacing and err->error in if check