fixed illegalstate error #2