Fix some warnings and issues created by pull requests