fixed up invalid switching in pad