finish button freeze function