Added a fix for the cornercase when the 'x3d' element gets hidden or is removed when nextFrameCallbacks are scheduled