fixed a bug in multi-subscript calculation