fix warnings and such