fix for switch - NSNumber cannot be cast to int