fixed bug where not calling typcase for CASE