Implementation of #350