fix Null when iteminhand is null and use newer methond in library