Fixed crash related to what OS your using