Fixed buggy check