It is said that 85% of discipline problems are the fault of the teacher. You want to do whatever you can to help your students pay attention, thus reducing the need to take time for discipline.
One easy step is to make sure that the seats or the students (if they are seated on the floor) are facing away from doors and windows.
Next time you go into your classroom, check to see if distracting windows and doors are in full view from where the children are sitting. This should help draw more attention to you and the lesson you are teaching.