Simpler typed array syntax, fixed logic bug