A recently introduced cellular automaton model for description of traffic flow is extended to include stochastic defects. We examine different types of defects. The moving defect provides a sharp transition on the fundamental diagram. A plateau is observed when stationary defects are present. Various kinds of fluctuations are discussed.