Fix J calculation