Set the right modes for Nodedit Fixes #24, #23 and #22