fixed check_size behavior