Fixes #001 and #004