Fix codereview issues