fix result variable