Merge changes from frereth-client