Fix logic with onetime