fixing dictionary expanding problems (2)