the previous fix was wrong. The problem is in the order of constructors.