goal detection bug fixed

finally