Auto resize bug fixes