Fixed bugs with beam and with eta assignment.