Bug fix and making sure WMA "first_reference" cycle is nonzero.