Second pass at fixing error