Fixed Edit button and functionality