fixed logical error for exiting loop in MAX!Cube binding