fixes id calculation; #123
fixes id calculation; #123