fixed a bug regarding incides input in parameter