Fix for #314

As title :)