Type safety fixes.
Merge pull request #15 from adaptive-logic/jsr-330

Type safety fixes.