internal logic fix