fixed check bugs