guard against ideal entropy being zero. Fixes: #22