Fixed some bugs from v2.0