added some things to fix #1