Fix picture handling. Better error reporting.