fix the 500 error when calling the block apis