Fixing issues with Stage3D