Fixed a bug where buttons sometimes fail to show (have zero-rect frames)