Fixed issue where getimagesize failed.