fix compiler warnings/errors