Fixed issue with processing multiple images causing memory warning.