fixed validation for ids