Fixed window:id() bug; part of #151.