fix bug with extended Array