Moved moveToFront from the top of our code down just before setupLayout().