Bugfix: bad handling of None case.