Fix issue #9: Wrong calculation of used memory?