Fixes wrong variable (#836)