More fixes after rigorous testing