fixing collision bugs