fixed an bug that occupy memoryw