fixed bug on coordinates