Here, 'k' was supposed to be the output in the text box, but instead '107' was.
I have spent the entire day surfing the web looking for a solution but no luck so far.
It has come to my understanding that the GUI uses a different string type (system), and therefore some sort of conversion is required to achieve the desired result.
Please help!