Fix part of #525