crud logic fix