Fix error with memory... some additional stuff should be considered about memory...