Fix content overwriting bug