Fixed bug resulting from interchanged parameters