Fixed small unused var bug