Improved vm prompt detection