Fixed issue with id assignment.