Code fixes for JP