fixed a core bug