Fix v0.7.6.beta.2

@thbishop, @brettweavnet, and @rickmendes I resolved the bug associated with the nil attributes cleanup.  The problem was when I moved the functionality into its own routine, the logic was flawed and caused this error.

Please take a look and let me know what you think...