fix oom
fix nonterminating function with int constants