Attempt to fix IllegalStateException on dimension changeSigned-off-by: Ross Allan <[email protected]> (commit: bbe69b5)