resolve bug; cannot detect collision