Fixed crashing due to Object[] casting

This addresses the issue #15 I raised initially
Oh. Sorry I missed that. It was my default Eclipse setting