further fixes for invalid IDs