Fix silly mistakes

Fixed a couple of silly mistakes where the return value wasn't being set.