rbm.m - negative phase bug fix