Fix int and double packet reading