Potentially fixed IllegalStateException