bug fix for coordinate program