Fixed bug in x-coord