minor fix, code motion