Fix prompt detection in DataHandler