Fixed a type and removed unnecessary array