fixing issues in advancedInput and output handlers