Fixed unintended call to purge_module