fixed a bug with 1 instead of i in create level 2 study.