Fixed bugs in STArray::resize and changed default allocate option upon resizing