Case-when not working yet.
Fixed case-when