Fix rectangle expand to the up/left (closes #445)