Slight bug fix with madlib output