bugfix in ios memory