fixing outputs issue