Fix project sorting bugs.

issue #7