Fix constant variables in range