Fixed syntax error in refactor