Bug fix and added Rectangle Functionality