call intValue instead of integerValue
Fix unsafe cast
general updates