Fixes #782: Second attempt