fix for length is added twice

also more auto complete done