fix remote mode when readline is enabled