fix wrong weights on cancel button click