add fixes and tests for Protocol.windowHandlePosition