-fixed argument out of range bug