Fix #12 and Fixes #13