fixed NullPointerBug