Merge from JoinHack

He fix the mess code issue.