fixed a bug in collection