Changed auto/manual mode detection