Fix infinite load in some cases