fix potential future bug + reduce temporary garbage