fix type safe