fix initial collapse/expand status

fix initial collapse/expand status while setting task's "collapsed" attribute to 'true'