Fix switch module to parse input and output commands properly