Type error solved