Hrm. I see nothing obviously wrong with that. What value does PIoutput have in the debugger?