Fix by @FireFart to recover communication with the application after a meterpreter session