fixed element null bug