Make small code fixes according to @tadatuta notations to pr