Added variable validation before output patch. Fix for Linux.com