Fixed issue with parameter sorting, causing issues