@edani's fix to close #377