More fixes for issue 21