MODE-650: Add Ivan's second patch