making changes on form hidding