Bump version code to 18 (0.5.0).
Fix some bugs.