fixed handling of id