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