As @stof pointed out the class definition was just plain wrong