Fixed typo in to_dict() method