Fixed bug in processing switch