Fix the created array being too long (fixes #56)