Close button and bugfix