Fix empty-return bug