Correct typo in as_logical