Fix bug in previous commit

problem with brackets and left unused variable