(core) fixed corner case caused by 4ce3eac