Well when in doubt, debug! Use the serial monitor to see exactly what your getting, and im sure you will find your answer.