fix page condition