Adds fix for issue #59 -- needs to be tested to see if it works