Some minor real life bugs fixed.