Fixed freezing issues.