fix for unefined return