fixed handling of ids

also dried up some specs