M7 bug fixed, a few misc. patches added