Sorry, I meant 'IllegalStateException' not IllegalArgumentException, just couldn't figure out how to put the comment on that line here :-).