Fix for issue #50, sorting one line too much

I have also updated the unit test, but can't run it myself because VS 2013 doesn't seem to support this anymore. :-/