fix bug on stdin processing when adding pics