Fixed if clause in ninScript