bugfixing, set memory