Fix SD errors
Better validation message for parameters