fixed errors in entry_key_clean