Fix ISR handler to not use owned strings (looks like malloc can not be used there)