Fix some warnings/errors