fix memory leak
Merge branch 'development' of github.com:mikedlowis/afm into development