fix silly php logic