Fixed compile warnings/errors.