Bug fixes
added ability to stop sorting