Fixes from the codereview for #52