Fixing bugs in fn_complete.