potential leak

there wasn't really any issue with these but some extra checks will not
hurt