Fixed a bug with offset of rectangular shapes