Fix for retrieving the right amount of data