fixing some mistakes in code samples