Fixing issues #25 and #26