fix broken implementation