Fixes usage of wrong variable