Fixed a couple of bugs for params