minor changes
find first error