core changes

Some fixes