Fixed warings and error messages