- fixed some undefined vars + fix Client->generateKey accessibility scope