Fix some compiler warnings and bugs

No match.