fixed dict key check error