Removed vector out of bounds bug