Fixed some bugs with the array methods.