fixed free memory calculation on api
Merge pull request #28 from bnied/combine-pushes

fixed free memory calculation on api