Fixes bug where number of posterior draws was computed incorrectly and wrong warning was displayed

The bug did not affect any computations, but only provided a wrong warning

(cherry picked from commit 819dd8c8992662fccbaa4b4c4a50719aca461977)