Fixing some issues reported by -Wall