improve canvas height management. fix scope not applying.