Fixed direct if check