fix invalid block exception
fix search