fix exit if interval is -1