Fix some warnings.

Patch by Joerg Sonnenberger!