Handling IllegalState errors, only seem to occur in form uploads