Fixed output bug