Applying mjthompson's fix.