fix a bug and add an prompt