merge pull request from @mikelovesrobots to fix a null exception on destroy