Edit to solve bug