Integrating Al's suggestions for fixes