Fix by Mitz Pettel, reviewed by Eric.