Fixed attempt to call nil