Fixes for image.php