Fixes issue #17, fixes issue #16, and fixes issue #15, if I'm not mistaken: