memory error solved