Fix some bugs caused by #172.
Bump to 4.0.2rc3