fixed some local variables