condition bug fixed