scratchpad sizing

fixes #542