if id latch
small fixes
Changes to fix compilation errors