Fix for issues #1 and