fixes in missing class and constant replacement