small edit

made vectors stop when moves out of boundary.