nan proofed the likelihood function
further nan-proofing