Fixed an embarrassing NameError (mispelled period) and indention mistake