Fix problems pointed out by cartec69@gmail.com.