2 bug fixes

* Fixed bug that could caused the gantt to not work correctly if you
added extra elements to the gantt template
* Fixed bug that caused the fromDate and toDate not to have any effect
if you set them before tasks where loaded in to the gantt