Fix memory storage