Fix for issue #643

I'm not sure about the return value that it should return