Migration fix

Hi,

This fix issue #584 introduced by #551