Several warnings fixed