fix some broken functionality

fix #193