fixed tempEntry not getting replaced