Implemented an option to disable auto sorting. This fixes bug #546