fix problem with loss