Fix for #122, #123