Added return to register_sample.