Fixed a load of warnings