Fix warnings/errors to under Linux and DEBUG