Shadowing of variables corrected.