Fixed variable location issue