fix some bugs

some bugs with card creation and edition are fixed now