Incorrect initialization of array (when upper bound is less than lower bound) has been avoided in some places.