Reverse changes for #12 and fix it properly