fixed md3dDevice undefined error