Merge pull request #5260 from BrzVlad/fix-handler-block