move return false to the right place. Fixes #1720