Fix swapped variables