Fix 2 'unrelated types' bugs found by findbugs

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>