fix raising error for wrong distributions type (#12)