Fixed Undefined warnings