finally fixed coordinate problems