Fix bug in unpacking value beta