fix problems after merging #1