Fixed resize bug #5