Fix error in tooltip caused by trailing whitespace on variable name