fixed local var spelling bug