fix bugs
set_entry implementation