Merge Nicks lates commits and Fix a bug