Fix leak in atom