repair pos=-1