various semantic fixes