Fixed bug where parameters were swapped