Tiny bugfix
Improve validation of incoming params