Fixed EventException and NullPointerException