Fixed bug, so max_length positions will be updated to the new positions, based on the prefix.