fixed wrong access to dictionary