JP's fix