fix potential resource leaks with scr and normal math on key reuse