fix for freezing