don't crash if not all params are set (and fix tests)