fix modal code