More small but critical fixes