Fixed bug in Behroozi function which caused infinite recursion