Fix for Issue 1

Addresses the issue where scanner was dumping memory and quitting.