fixes issues 581 and 586 -> https://github.com/away3d/away3d-core-fp11/issues/581 and https://github.com/away3d/away3d-core-fp11/issues/586