Fix some issues

Check the git logs to see what was changed.