Fixed both mode bug