vector polygon clip finally works, XMAX bug fixed