resovled bug in buttonPreview