Corrected indentation and a typo in the code.