fix for fluky problem 'argument out of range'