fixed result printing error.