fix potential crash
fix potential crash

alexjlockwood/ShapeShifter,Sagi363/ShapeShifter,alexjlockwood/ShapeShifter,alexjlockwood/ShapeShifter,Sagi363/ShapeShifter,Sagi363/ShapeShifter,alexjlockwood/ShapeShifter