Removed looking up for key twice on write.