handle type def in completion too
fix ref text
better fix to prev