Fixed some clang warnings
Fixed a sed -i glitch.