Some memory fixes iOS