fixes sort row problems, gantt resize problems and from to date undefined bug

This pull takes the place of pull request #1 so that pull request can be deleted