Minor bug fixes. Mostly for E_STRICT.
and a minor problem in the upload handler.