Added maximize toggling the proper way.