Fixed bug with improper coords ordering