fixes for the joint probability given the last state