fixed moveCounter bug and modal closing bug