fix unfinished code from merging #228