Various fix from CR #76