Added missing cast for a call to min
Fixed explicit instanciation being after the first use for deleters