protect from bad ids