error checking bug VERIFIED