Fixed weird logic in scotch