Raspberry: fixed parsing function