Added listener to watch for expand event. Possible fix for #369