fixed id compare leading to server crashes