Fixed a NPE when using oneTime and resetOneTime