Some fixes for testing