[bugfix] return's value depends on uninitialised var