slight fixes on param validation