fixed resize bug for good