correct issues pointed out by pullreview