Corrected output of several functions