Fix for issue #7 handle elements resize based on number of elements and constant max of 10