fixed typo and made the rectangle more stable