fix guard condition