More small bugfixes restoring functionality broken during application rewrite