Testing and changes: fix #13, fix #22