Various fix for testing