fixes #39, fixes 47; MiSome bugfixes for application