more fixes for invalid IDs