Adding fixes for compatibility with J3.x