Fixed some bugs before release