A surgical instrument, comprising: a handle assembly; a jaw assembly comprising a staple cartridge containing a plurality of staples and an anvil to form the plurality of staples upon firing; a lockout mechanism configured to prevent reuse of the jaw assembly; the jaw assembly comprising a flexible drive beam coupled to the lockout mechanism, the lockout mechanism being configured to transition between an unlocked state and a locked state upon retraction of the flexible drive beam; the instrument further comprising: a drive assembly at least partially located within the handle assembly and connected to the jaw assembly and the lockout mechanism; a motor operatively coupled to the drive assembly and configured to drive the flexible drive beam distally; and a controller operatively coupled to the motor, the controller configured to control supply of electrical current to the motor and to monitor a current draw of the motor, wherein, in the locked state, the lockout mechanism is configured to prevent distal movement of the flexible drive beam and wherein the controller is configured to terminate the supply of electrical current to the motor in response to a drop in current draw indicative of a failure of the lockout mechanism, wherein the drop in the current draw corresponds to a failure of the lockout mechanism to transition into the locked state upon retraction of the flexible drive beam. a handle assembly; a jaw assembly comprising a staple cartridge containing a plurality of staples and an anvil to form the plurality of staples upon firing; a lockout mechanism configured to prevent reuse of the jaw assembly; the jaw assembly comprising a flexible drive beam coupled to the lockout mechanism, the lockout mechanism being configured to transition between an unlocked state and a locked state upon retraction of the flexible drive beam; the instrument further comprising: a drive assembly at least partially located within the handle assembly and connected to the jaw assembly and the lockout mechanism; a motor operatively coupled to the drive assembly and configured to drive the flexible drive beam distally; and a controller operatively coupled to the motor, the controller configured to control supply of electrical current to the motor and to monitor a current draw of the motor, wherein, in the locked state, the lockout mechanism is configured to prevent distal movement of the flexible drive beam and wherein the controller is configured to terminate the supply of electrical current to the motor in response to a drop in current draw indicative of a failure of the lockout mechanism, wherein the drop in the current draw corresponds to a failure of the lockout mechanism to transition into the locked state upon retraction of the flexible drive beam. a drive assembly at least partially located within the handle assembly and connected to the jaw assembly and the lockout mechanism; a motor operatively coupled to the drive assembly and configured to drive the flexible drive beam distally; and a controller operatively coupled to the motor, the controller configured to control supply of electrical current to the motor and to monitor a current draw of the motor, wherein, in the locked state, the lockout mechanism is configured to prevent distal movement of the flexible drive beam and wherein the controller is configured to terminate the supply of electrical current to the motor in response to a drop in current draw indicative of a failure of the lockout mechanism, wherein the drop in the current draw corresponds to a failure of the lockout mechanism to transition into the locked state upon retraction of the flexible drive beam.