prevent errors when bad params are submitted

I had some errors in my production system do to this.