Crowdsale fixes

fix #818 fix #819