Fixed bug in do_prefix