fixing resize exception and others
fixing resize exception and others