Fixed isquit function