Fix automap in editor (fixes #57)