fixes first part of #58