Fixed hit/miss bug