Minor cleanup and an attempt at fixing an iOS problem.