new fix which should work with and without c11