memory collision bug: fixing