Fixes param order bug and removes some dbg msgs