fixed "null pointer exception bug"