Fixed, now it is implemented using pattern matching.