Fixed error in Activity Mode