various little fixes (one was critical though)