A surgical device includes a handle assembly having a controller; a first motor; and a second motor. The surgical device also includes an adapter assembly having: a tubular housing defining a longitudinal axis having a proximal end portion configured to couple to the handle assembly, and a distal end portion; a first actuation assembly disposed within the tubular housing and coupled to the first motor; and a second actuation assembly disposed within the tubular housing and coupled to the second motor. The surgical device further includes an end effector configured to couple to the distal end portion of the adapter assembly. The end effector is coupled to the first actuation assembly that articulates the end effector about an articulation axis that is perpendicular to the longitudinal axis. The end effector also includes a flexible drive beam coupled to the second actuation assembly and movable axially by the second actuation assembly. The controller is configured to maintain an initial articulation position of the end effector in response to axial movement of the flexible drive beam.