Code snippet fixes