Fixed dirty/update cycle in Rectangle.js