Improve the implementation of "once"