Fixed this up so it works.