fixed condition to prevent errors while debugging