I have fixed the GUI part, but forgot to update the code that actually fetches the value while painting.