fixed a bug in delta