Fix #1166 by using the correct array size