Fix bugs in blocklist handling