fixing null pointer
fixing basic window event tests