fix type errors in master