Fix compiler warnings

See #800