Fix for wrong return value