Added freeze fix by Dk