fixed condition that made appear wrong message on url change