Fixing id_of to return value