fix some problems with cocoon