fix #1es #16 fixes #21