fix: null pointer exception due to unchecked auto-unboxing