Bugfix initialization routines and double window message handling