Possible fix for #2 and #5.