Fix for issue 223

Not to be merged yet, just for discussion ;)