Fixed states and added edit button