Fixing reference to id