Bug fix - flagging last cell if all inputs equal