fixing syntax error i've introduced while refactoring