Implementing changes as per RT ticket 4140

See https://rt.cpan.org/Ticket/Display.html?id=4140