Fix prior bug

Hi Sebastian,

As you see this is a very quick fix to the code to get rid of the bug in calculating the priors.