Put back code to fix edges bug. :(