fixed bug in range variable across modules