fix gcc asserts