Check for id == -1 instead of 0