Trashed the damn shutdown hook, workaround with window listener