fixed conditional reverse issue