Fixed a bug which happens on new os version