Fix range not set error.