fixed typo; added missing braces