987626: Remove PUTS while opening preferences dialog

Use handler_block_by_func instead of handler_block if handler_block is not doing what it should be.