fixed empty dict key bugs