Some fixes from testing