Some fixes. Should work now.