global volatile variable not being updated in ISR
You are using pos outside of the interrupt without turning the interrupt off.  pos is two bytes, so it takes the Arduino more than one cycle to read in that variable no matter how it is handled.  If an interrupt occurs during that time, you get a corrupted value.  

You need to have a cli() and then make a copy of pos to another variable and then a sei() and then use that copy in your calculations in loop.