Fixed the issues Max had mentioned in previous emails.