try to fix calculation of used memory