Fix #298 wrong return value

Fixes #298