Made width and height private and added a control in the set method to avoid values lower than 0.