fix property not getting reset when modal is closed