fix small bug: was assigning a table out of its size