Added argument check for completion.
Allow NULL prompt.
Fixed temporary prompt length update.