OK, I didn't look in that much detail. Your version seems to be the more correct one.