Our intentions may be very good but because the intelligence is limited the action may turn out to be a mistake - a mistake but not necessarily a sin for sin comes out of a wrong intention.