Added condition to split current test and fixed a bug