cwiid_open does not always return an error, that makes the wm variable nil which if passed to cwiid causes the segfault
this fixes #1