What are some factors that can affect the preservation of fossils in rock?