Fix bug in scratchpad data setter