Manually merged changes suggested by #160