Need to fix collision sample but fixed some bugs