Fixed issue forcing infinite loop while switching to error prone actvitity