Fixing a few functions (which are not yet used and are only a few lines long) as a quick bug fix.
@afaulkne