Merged changes from minshu's repo up to commit b13523c