Fix from bugs made during core cleanup