Added check for mb_detect_encoding(), fixed reference issue; save_property action fixes