Fixing variable name bug