Amended bug #21 solution to be more language agnostic