fixed check signature bug