Fix for #11 and #12.