Fix list to array error