fix domain issues, changed to python [MJ-612]